package concurrency.intrinsic.locks;

public class MultipleLocks {
  private long c1 = 0;
  private long c2 = 0;
  private Object lock1 = new Object();
  //private Object lock2 = new Object();

  public void incrementC1() {
      synchronized(lock1) {
          try{
            Thread.sleep(30 * 1000);
          }
          catch (InterruptedException e){
            e.printStackTrace();
          }
          c1++;
      }
  }

  public void incrementC2() {
      synchronized(lock1) {
          c2++;
      }
  }
}
